package com.unb.transportebsb;

import java.util.List;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;

import com.nutiteq.log.Log;
import com.unb.webservice.Postgis;

public class ListarLinhasActivity extends ListActivity {

    private List<String> linhas;
    double latitude, longitude;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Bundle extras = this.getIntent().getExtras();
        longitude = extras.getDouble("longitude");
        Log.debug("Longitude: " + longitude);
        latitude = extras.getDouble("latitude");

        linhas = new Postgis().qryLines(latitude, longitude);

        this.setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, linhas));

    }

}
